import java.util.Random;
import java.util.Scanner;
public class project02 {
    public static void main(String[] args) {
        Random random = new Random();
        int number = random.nextInt(100) + 1;
        Scanner scanner = new Scanner(System.in);

        while (true) {
            System.out.println("请输入1-100之间的整数");
            int num = scanner.nextInt();
            if (num > number) {
                System.out.println("你猜的数据大了！");
            } else if (num < number) {
                System.out.println("你猜的数据小了！");
            } else {
                System.out.println("猜对了，游戏结束！");
                break;
            }
        }
    }
}